<?php

/**
 * Created by PhpStorm.
 * User: yanshinian@yeah.net
 * Date: 2019/5/22
 * Time: 17:51.
 * jd.union.open.goods.query
 */
class UnionOpenGoodsJingfeQueryRequest
{
    /**
     * @var int  频道id：1-好券商品,2-超级大卖场,10-9.9专区,22-热销爆品,23-为你推荐,24-数码家电,25-超市,26-母婴玩具,27-家具日用,28-美妆穿搭,29-医药保健,30-图书文具,31-今日必推,32-品牌好货,33-秒杀商品,34-拼购商品,109-新品首发,110-自营,125-首购商品,129-高佣榜单,130-视频商品
     */
    private $eliteId;
    /**
     * @var int  页码，默认1
     */
    private $pageIndex = 1;
    /**
     * @var int  每页数量，默认20，上限50
     */
    private $pageSize = 20;
    /**
     * @var String  排序字段(price：单价, commissionShare：佣金比例, commission：佣金， inOrderCount30DaysSku：sku维度30天引单量，comments：评论数，goodComments：好评数)
     */
    private $sortName = "   price";
    /**
     * @var String  asc,desc升降序,默认降序
     */
    private $sort = "desc";
    /**
     * @var String  联盟id_应用id_推广位id，三段式
     */
    private $pid;
    /**
     * @var String  支持出参数据筛选，逗号','分隔，目前可用：videoInfo
     */
    private $fields;


    private $apiParas = array();

    public function setEliteId($eliteId)
    {
        $this->eliteId = $eliteId;
        $this->apiParas['eliteId'] = $eliteId;
    }

    public function getEliteId()
    {
        return $this->eliteId;
    }

    public function setPageIndex($pageIndex)
    {
        $this->pageIndex = $pageIndex;
        $this->apiParas['pageIndex'] = $pageIndex;
    }

    public function getPageIndex()
    {
        return $this->pageIndex;
    }

    public function setPageSize($pageSize)
    {
        $this->pageSize = $pageSize;
        $this->apiParas['pageSize'] = $pageSize;
    }

    public function getPageSize()
    {
        return $this->pageSize;
    }

    public function setSortName($sortName)
    {
        $this->sortName = $sortName;
        $this->apiParas['sortName'] = $sortName;
    }

    public function getSortName()
    {
        return $this->sortName;
    }

    public function setSort($sort)
    {
        $this->sort = $sort;
        $this->apiParas['sort'] = $sort;
    }

    public function getSort()
    {
        return $this->sort;
    }

    public function setPid($pid)
    {
        $this->pid = $pid;
        $this->apiParas['pid'] = $pid;
    }

    public function getPid()
    {
        return $this->sort;
    }

    public function setFields($fields)
    {
        $this->fields = $fields;
        $this->apiParas['fields'] = $fields;
    }

    public function getFields()
    {
        return $this->fields;
    }


    public function getApiMethodName()
    {
        return 'jd.union.open.goods.jingfen.query';
    }

    public function getApiParas()
    {
        return array('goodsReq' => $this->apiParas);
    }

    public function check()
    {
        RequestCheckUtil::checkNotNull($this->eliteId,"eliteId");
    }

    public function putOtherTextParam($key, $value)
    {
        $this->apiParas[$key] = $value;
        $this->$key = $value;
    }
}
